[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            boxwindow - draw a 'window'

  Syntax              int boxwindow(int left, int top, int right, int
                                    bottom, char frame[], char *title,
                                    int titlejustify, char colborder,
                                    char coltitle, char colnorm, char
                                    *buffer);

  Prototype in        video.h

  Remarks             draws a 'window'-like box (similiar to box(), but
                      with a title) at the coordinates (left,top) to
                      (right,bottom). The characters in frame[] are used
                      to generate the frame, with frame[9] and frame[10]
                      used as pre-/post-title separators if a title is
                      specified (title justification is not NONE). The
                      title is aligned as per titlejustify (LEFT, CENTER,
                      RIGHT or NONE. See HOWARD.H for more details). The
                      frame uses the colborder attribute, the title, if
                      any, uses the coltitle attribute and the inner
                      portions of the box are filled with spaces of
                      colnorm color. The box is stored in the memory
                      allocated by buffer and displayed with puttext().

                      If a title is specified (title justification is not
                      NONE) the title is separated from the pre-/post-
                      -title separators by a space.

                      Sufficient memory must be allocated for buffer to
                      contain the entire box, with attributes (see
                      scrbuff()).

                      Upon completion, buffer contains a copy of the
                      screen image of the box displayed (usable by
                      puttext()).

                      This routine is taken from an older version of the
                      popup...() and litebar...() creation functions.
                      This function does virtually no error checking.

  Return value        returns zero upon succesful completion, -1 if an
                      error occurs.

  See also            global variables
                      box(), horiz_line(), litebar...(), popup...(),
                      vert_line()

  Example             #include <video.h>
                      #include <howard.h>      /* for CENTER */
                      #include <color.h>       /* for colors */

                      main()
                      {
                           char vidbuff[scrbuff(1,1,15,4)],
                                framebox[] = "abcdefgh[]";

                           boxwindow(1,1,15,4,framebox,"Title",CENTER,
                                     CYAN,YELLOW,RED,vidbuff);
                      }

  Program output      abb[ Title ]bbc
                      h             d
                      h             d
                      gfffffffffffffe


See Also: boxwindow() horiz_line() shadow() vert_line()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson